<include file="Common:header"/>
<body class="bank_info">
<div class="bannerbaowei">
		<div class="dajianxi"></div>
		<div class="tit1h4391">修改银行卡信息</div>
</div>
<div class="mymodal">
	<h1 style="color:#FF5454;text-align:center;font-size:1.3em;">
		重要提示：
	</h1>
	<p style="color:#656565;font-size:1.1em;">
		以后银行卡提现将会提现到此账户上,请谨慎填写,如有更换请重新修改
		。如果填写有误,将无法进行银行转账,导致提现失败
	</p>
</div>
<div class="form_content">
	<form id="myform" action="" class="formm" onsubmit="return checkform()">
		<input type="hidden" name="paytype" value="1">
		<div class="form-input">
			<div class="user_name">
				<label for="realname" class="label_font">户名：</label>
				<input type="text" id="realname" name="realname" class="input_e_i" value="<{$bankinfo['realname']}>" placeholder="持卡人真实姓名">
			</div>
		</div>
		<div class="form-input">
			<div class="user_name">
				<label for="bankname" class="label_font">开户银行：</label>
				<input type="text" id="bankname" name="bankname" class="input_e_i" value="<{$bankinfo['bankname']}>" placeholder="所属银行">
			</div>
		</div>
		<div class="form-input">
			<div class="user_name">
				<label for="payaccount" class="label_font">银行卡号：</label>
				<input type="text" id="payaccount" name="payaccount" class="input_e_i" value="<{$bankinfo['payaccount']}>" placeholder="卡号">
			</div>
		</div>
		<div class="form-input">
			<div class="user_name">
				<label for="bankpath" class="label_font">地区支行地址：</label>
				<input type="text" id="bankpath" name="bankpath" class="input_e_i" value="<{$bankinfo['bankpath']}>" placeholder="开户银行地址,所在省市">
			</div>
		</div>
		<div class="max_box">
			<div class="form-input">
				<button class="input_e_s">
					提&nbsp;交&nbsp;
				</button>
			</div>
		</div>
	</form>
</div>
<script>
	function checkform(){
		var realname = $("#realname");
		var bankname = $("#bankname");
		var bankpath = $("#bankpath");
		var payaccount = $("#payaccount");

		if(realname.val()== ''){
			alert("请填写户名");
			realname.focus();
			return false;
		}

		if(bankname.val()== ''){
			alert("请填写开户银行");
			bankname.focus();
			return false;
		}

		if(bankpath.val()== ''){
			alert("请填写地区支行");
			bankpath.focus();
			return false;
		}

		if(payaccount.val()== ''){
			alert("请填写银行卡号");
			payaccount.focus();
			return false;
		}

		var url ="<{:U('User/bank_info')}>";
		$.post(url,$("#myform").serializeArray(),function(r){
					if(r.status){
						alert(r.msg);
						location.href=r.url;
					}else{
						alert(r.msg);
					}
		});
		return false;
	}
</script>
<include file="Common:menu"/>
</body>
</html>
